﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SurveySystem.Core;
using System.Web.Security;

namespace SurveySystem.Web
{
    public partial class SurveySystem : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (Page.User.Identity.IsAuthenticated)
            {
                Label lblUserName = loginView.FindControl("lblUserName") as Label;
                lblUserName.Text = Page.User.Identity.Name;
            }
        }

        protected void btnReset_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
            ManagementBLL.ResetDb();
            Response.Redirect("~/Default.aspx");
        }

        protected void btnReInitBLL_Click(object sender, EventArgs e)
        {
            ManagementBLL.InitializeBLL();
        }

    }
}
